import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { StreamingMedia, StreamingVideoOptions } from '@ionic-native/streaming-media';
import { VgFullscreen } from 'videogular2/src/controls/vg-fullscreen/vg-fullscreen';
import {ViewChild } from '@angular/core';

@IonicPage()
@Component({
  selector: 'page-video',
  templateUrl: 'video.html',
})

export class VideoPage {
  sources : any[] = [{id:1,title:"是否",desc:"歌曲：《是否》 演唱：邓紫棋"},{id:2,title:"是否",desc:"歌曲：《是否》 演唱：邓紫棋"}];
  constructor(public navCtrl: NavController, public navParams: NavParams,private streamingMedia: StreamingMedia) {
  
  // let options: StreamingVideoOptions = {
  //   successCallback: () => { console.log('Video played') },
  //   errorCallback: (e) => { console.log('Error streaming') },
  //   orientation: 'landscape'
  // };
  
  // this.streamingMedia.playVideo('https://path/to/video/stream', options);
}

//@ViewChild('fullscreen')fullscreen: VgFullscreen;


  ionViewDidLoad() {
    // this.fullscreen.onClick = ()=>{
    //   //重写全屏事件，下面换成自定义全屏操作
    //   console.log('fullscreen');
    // };
  }

}
